<template>
  <div class="videoDetail">
    <video src="" controls="controls"></video>
    <div class="comment">
      <p class="title">{{ title}}</p>
      <p class="content">{{content}}</p>
    </div>
    <div class="flex">
      <div class="love-all" @click="love">
        <img class="love" v-if="loveTag=== 0" src="../../../assets/images/live/004.png">
        <img class="loved" v-else="loveTag===1" src="../../../assets/images/live/004-active.png">
        <p>{{loveNum}}</p>
      </div>
      <div class="good-all" @click="good">
        <img class="good" v-if="goodTag=== 0" src="../../../assets/images/live/005.png">
        <img class="gooded" v-else="goodTag===0" src="../../../assets/images/live/005-active.png">
        <p>{{goodNum}}</p>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "videoDetail",
    data() {
      return {
        active: 1,
        loveTag: 0,
        goodTag: 0,
        loveNum: 0,
        goodNum: 0,
        prize: 23.5,
        title: '小程序',
        content: '评论哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇论哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇论哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇',
      };
    },
    methods: {
      // 喜欢
      love() {
        if (this.loveTag === 1) {
          this.loveNum --;
          this.loveTag = 0;
        }
        else {
          this.loveNum ++;
          this.loveTag = 1;
        }
      },
      // 点赞
      good() {
        if (this.goodTag === 0) {
          this.goodNum ++;
          this.goodTag = 1;
        }
        else {
          this.goodNum--;
          this.goodTag = 0;
        }
      },
    }
  }
</script>

<style scoped lang="less">
  .videoDetail {
     video {
      width: 100%;
      height: 200px;
    }
    .comment {
      text-align: left;
      line-height: 140%;
      color: #343434;
      padding: 18px;
      .title {
        padding-bottom: 16px;
        text-align: center;
        font-weight: bold;
      }
      .content {
        text-indent: 24px;
        font-size: 14px;
      }
    }
    .flex {
      position: fixed;
      right: 10px;
      top: 60%;
      img {
        height: 40px;
        display: block;
      }
      p {
        font-size: 10px;
        color: gray;
        padding: 2px 0 4px 0;
      }
    }

  }
</style>
